package com.hhj.demo;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ImportResource;
import org.springframework.test.context.ContextConfiguration;

/**
 * Created by KING on 2018/7/18.
 */
@ContextConfiguration
@ImportResource("classpath:spring.xml")
public class MyImportResource {
    public MyImportResource() {
        System.out.println("初始化GetBeanByFactoryBean...");
    }

    @Bean
    public OtherObj getOtherObjBean() {
        return new OtherObj();
    }

    @Bean
    public OtherObj2 getOtherObj2Bean() {
        return new OtherObj2();
    }
}
